from server import db

from sqlalchemy import Column, PrimaryKeyConstraint
from sqlalchemy.dialects.mysql import INTEGER


# 系统用户角色
class SysUserRole(db.Model):
    __tablename__ = 'sys_user_role'
    user_id = Column(INTEGER(unsigned=True), primary_key=True, comment="用户id")
    role_id = Column(INTEGER(unsigned=True), primary_key=True, comment="角色id")

    __table_args__ = (
        PrimaryKeyConstraint('user_id', 'role_id'),
        {},
    )


db.create_all()
